This is an online version of RStudio where we will be working today. We will use this for the hands-on activity portion. Visit this site and create an account, or log in with a gmail account:
R is a software environment for statistical computing and graphics. Using R you can do rigorous statistical analysis, clean and manipulate data, and create publication-quality graphics.
clustering map
Stephen Cass, “The 2018 Top Programming Languages”, IEEE Spectrum
Packages are programs that you import into R to help make tasks easier. The most popular R packages for working with data include dplyr, stringr, tidyr, and ggplot2.
Find a package:
This is an example of a plot created with the base R histogram function.
ggplot2 is the most popular visualization package for R. It’s the best all-purpose package for creating many types of 2-dimensional visualizations.
Highcharter is an R package known as an htmlwidget, which allows you to use popular javascript packages for visualization and create interactive web charts. It’s free to use highcharter unless you are using it for a commercial or government purpose.
Leaflet is popular among web developers for creating interactive web maps. It’s an htmlwidget for R based on LeafletJS.
shiny is a popular R package for creating web applications.
ggplot2 was created on the principles of the Layered Grammar of Graphics (2010), by Hadley Wickham and based of off work from Wilkinson, Anand, & Grossman (2005) and Jaques Bertin (1983).
Credit: RStudio, Inc. • CC BY RStudio • info@rstudio.com • 844-448-1212 • rstudio.com
Proposed by Hadley Wickham (2014).
Tidy data has the following characteristics: “each variable is a column, each observation is a row, and each type of observational unit is a table.”
credit: Hadley Wickham
Collapse columns of multiple years into one variable: year
credit: Hadley Wickham
Unpack columns of more than one variable into distinct columns. Remember: only one column per variable!
credit: Hadley Wickham
The tidyverse is a set of packages for working with data that include packages for cleaning, manipulating, and visualizing data in R. We will be using the tidyverse package in our workshop activity. See the tidyverse website For more information about tidyverse package.